<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><link rel="stylesheet" type="text/css" href="style.css" /><script type="text/javascript" src="highlight.js"></script></head><body><pre><span class="hs-pragma">{-# LANGUAGE Trustworthy #-}</span><span>
</span><span id="line-2"></span><span>
</span><span id="line-3"></span><span class="hs-comment">-----------------------------------------------------------------------------</span><span>
</span><span id="line-4"></span><span class="hs-comment">-- |</span><span>
</span><span id="line-5"></span><span class="hs-comment">-- Module      :  GHC.Stack</span><span>
</span><span id="line-6"></span><span class="hs-comment">-- Copyright   :  (c) The University of Glasgow 2011</span><span>
</span><span id="line-7"></span><span class="hs-comment">-- License     :  see libraries/base/LICENSE</span><span>
</span><span id="line-8"></span><span class="hs-comment">--</span><span>
</span><span id="line-9"></span><span class="hs-comment">-- Maintainer  :  cvs-ghc@haskell.org</span><span>
</span><span id="line-10"></span><span class="hs-comment">-- Stability   :  internal</span><span>
</span><span id="line-11"></span><span class="hs-comment">-- Portability :  non-portable (GHC Extensions)</span><span>
</span><span id="line-12"></span><span class="hs-comment">--</span><span>
</span><span id="line-13"></span><span class="hs-comment">-- Access to GHC's call-stack simulation</span><span>
</span><span id="line-14"></span><span class="hs-comment">--</span><span>
</span><span id="line-15"></span><span class="hs-comment">-- @since 4.5.0.0</span><span>
</span><span id="line-16"></span><span class="hs-comment">-----------------------------------------------------------------------------</span><span>
</span><span id="line-17"></span><span>
</span><span id="line-18"></span><span class="hs-pragma">{-# LANGUAGE MagicHash, NoImplicitPrelude, ImplicitParams, RankNTypes #-}</span><span>
</span><span id="line-19"></span><span class="hs-keyword">module</span><span> </span><span class="hs-identifier">GHC.Stack</span><span> </span><span class="hs-special">(</span><span>
</span><span id="line-20"></span><span>    </span><span class="annot"><a href="GHC.Stack.html#errorWithStackTrace"><span class="hs-identifier">errorWithStackTrace</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-21"></span><span>
</span><span id="line-22"></span><span>    </span><span class="annot"><span class="hs-comment">-- * Profiling call stacks</span></span><span>
</span><span id="line-23"></span><span>    </span><span class="annot"><a href="GHC.Stack.CCS.html#currentCallStack"><span class="hs-identifier">currentCallStack</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-24"></span><span>    </span><span class="annot"><a href="GHC.Stack.CCS.html#whoCreated"><span class="hs-identifier">whoCreated</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-25"></span><span>
</span><span id="line-26"></span><span>    </span><span class="annot"><span class="hs-comment">-- * HasCallStack call stacks</span></span><span>
</span><span id="line-27"></span><span>    </span><span class="annot"><a href="GHC.Stack.Types.html#CallStack"><span class="hs-identifier">CallStack</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Stack.Types.html#HasCallStack"><span class="hs-identifier">HasCallStack</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Stack.html#callStack"><span class="hs-identifier">callStack</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Stack.Types.html#emptyCallStack"><span class="hs-identifier">emptyCallStack</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Stack.Types.html#freezeCallStack"><span class="hs-identifier">freezeCallStack</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-28"></span><span>    </span><span class="annot"><a href="GHC.Stack.Types.html#fromCallSiteList"><span class="hs-identifier">fromCallSiteList</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Stack.Types.html#getCallStack"><span class="hs-identifier">getCallStack</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Stack.html#popCallStack"><span class="hs-identifier">popCallStack</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Exception.html#prettyCallStack"><span class="hs-identifier">prettyCallStack</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-29"></span><span>    </span><span class="annot"><a href="GHC.Stack.Types.html#pushCallStack"><span class="hs-identifier">pushCallStack</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Stack.html#withFrozenCallStack"><span class="hs-identifier">withFrozenCallStack</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-30"></span><span>
</span><span id="line-31"></span><span>    </span><span class="annot"><span class="hs-comment">-- * Source locations</span></span><span>
</span><span id="line-32"></span><span>    </span><span class="annot"><a href="GHC.Stack.Types.html#SrcLoc"><span class="hs-identifier">SrcLoc</span></a></span><span class="hs-special">(</span><span class="hs-glyph">..</span><span class="hs-special">)</span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Exception.html#prettySrcLoc"><span class="hs-identifier">prettySrcLoc</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-33"></span><span>
</span><span id="line-34"></span><span>    </span><span class="annot"><span class="hs-comment">-- * Internals</span></span><span>
</span><span id="line-35"></span><span>    </span><span class="annot"><a href="GHC.Stack.CCS.html#CostCentreStack"><span class="hs-identifier">CostCentreStack</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-36"></span><span>    </span><span class="annot"><a href="GHC.Stack.CCS.html#CostCentre"><span class="hs-identifier">CostCentre</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-37"></span><span>    </span><span class="annot"><a href="GHC.Stack.CCS.html#getCurrentCCS"><span class="hs-identifier">getCurrentCCS</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-38"></span><span>    </span><span class="annot"><a href="GHC.Stack.CCS.html#getCCSOf"><span class="hs-identifier">getCCSOf</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-39"></span><span>    </span><span class="annot"><a href="GHC.Stack.CCS.html#clearCCS"><span class="hs-identifier">clearCCS</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-40"></span><span>    </span><span class="annot"><a href="GHC.Stack.CCS.html#ccsCC"><span class="hs-identifier">ccsCC</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-41"></span><span>    </span><span class="annot"><a href="GHC.Stack.CCS.html#ccsParent"><span class="hs-identifier">ccsParent</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-42"></span><span>    </span><span class="annot"><a href="GHC.Stack.CCS.html#ccLabel"><span class="hs-identifier">ccLabel</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-43"></span><span>    </span><span class="annot"><a href="GHC.Stack.CCS.html#ccModule"><span class="hs-identifier">ccModule</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-44"></span><span>    </span><span class="annot"><a href="GHC.Stack.CCS.html#ccSrcSpan"><span class="hs-identifier">ccSrcSpan</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-45"></span><span>    </span><span class="annot"><a href="GHC.Stack.CCS.html#ccsToStrings"><span class="hs-identifier">ccsToStrings</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-46"></span><span>    </span><span class="annot"><a href="GHC.Stack.CCS.html#renderStack"><span class="hs-identifier">renderStack</span></a></span><span>
</span><span id="line-47"></span><span>  </span><span class="hs-special">)</span><span> </span><span class="hs-keyword">where</span><span>
</span><span id="line-48"></span><span>
</span><span id="line-49"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Stack.CCS.html"><span class="hs-identifier">GHC.Stack.CCS</span></a></span><span>
</span><span id="line-50"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Stack.Types.html"><span class="hs-identifier">GHC.Stack.Types</span></a></span><span>
</span><span id="line-51"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.IO.html"><span class="hs-identifier">GHC.IO</span></a></span><span>
</span><span id="line-52"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Base.html"><span class="hs-identifier">GHC.Base</span></a></span><span>
</span><span id="line-53"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.List.html"><span class="hs-identifier">GHC.List</span></a></span><span>
</span><span id="line-54"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Exception.html"><span class="hs-identifier">GHC.Exception</span></a></span><span>
</span><span id="line-55"></span><span>
</span><span id="line-56"></span><span class="hs-comment">-- | Like the function 'error', but appends a stack trace to the error</span><span>
</span><span id="line-57"></span><span class="hs-comment">-- message if one is available.</span><span>
</span><span id="line-58"></span><span class="hs-comment">--</span><span>
</span><span id="line-59"></span><span class="hs-comment">-- @since 4.7.0.0</span><span>
</span><span id="line-60"></span><span class="hs-pragma">{-# DEPRECATED</span><span> </span><span class="hs-pragma">errorWithStackTrace</span><span> </span><span class="hs-pragma">&quot;'error' appends the call stack now&quot;</span><span> </span><span class="hs-pragma">#-}</span><span>
</span><span id="line-61"></span><span>  </span><span class="hs-comment">-- DEPRECATED in 8.0.1</span><span>
</span><span id="line-62"></span><span id="local-6989586621679562477"><span class="annot"><a href="GHC.Stack.html#errorWithStackTrace"><span class="hs-identifier hs-type">errorWithStackTrace</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Base.html#String"><span class="hs-identifier hs-type">String</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="#local-6989586621679562477"><span class="hs-identifier hs-type">a</span></a></span></span><span>
</span><span id="line-63"></span><span id="errorWithStackTrace"><span class="annot"><span class="annottext">errorWithStackTrace :: forall a. String -&gt; a
</span><a href="GHC.Stack.html#errorWithStackTrace"><span class="hs-identifier hs-var hs-var">errorWithStackTrace</span></a></span></span><span> </span><span id="local-6989586621679562427"><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679562427"><span class="hs-identifier hs-var">x</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">IO a -&gt; a
forall a. IO a -&gt; a
</span><a href="GHC.IO.Unsafe.html#unsafeDupablePerformIO"><span class="hs-identifier hs-var">unsafeDupablePerformIO</span></a></span><span> </span><span class="annot"><span class="annottext">(IO a -&gt; a) -&gt; IO a -&gt; a
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="hs-keyword">do</span><span>
</span><span id="line-64"></span><span>   </span><span id="local-6989586621679562425"><span class="annot"><span class="annottext">[String]
</span><a href="#local-6989586621679562425"><span class="hs-identifier hs-var">stack</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">Ptr CostCentreStack -&gt; IO [String]
</span><a href="GHC.Stack.CCS.html#ccsToStrings"><span class="hs-identifier hs-var">ccsToStrings</span></a></span><span> </span><span class="annot"><span class="annottext">(Ptr CostCentreStack -&gt; IO [String])
-&gt; IO (Ptr CostCentreStack) -&gt; IO [String]
forall (m :: * -&gt; *) a b. Monad m =&gt; (a -&gt; m b) -&gt; m a -&gt; m b
</span><a href="GHC.Base.html#%3D%3C%3C"><span class="hs-operator hs-var">=&lt;&lt;</span></a></span><span> </span><span class="annot"><span class="annottext">String -&gt; IO (Ptr CostCentreStack)
forall dummy. dummy -&gt; IO (Ptr CostCentreStack)
</span><a href="GHC.Stack.CCS.html#getCurrentCCS"><span class="hs-identifier hs-var">getCurrentCCS</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679562427"><span class="hs-identifier hs-var">x</span></a></span><span>
</span><span id="line-65"></span><span>   </span><span class="hs-keyword">if</span><span> </span><span class="annot"><span class="annottext">[String] -&gt; Bool
forall a. [a] -&gt; Bool
</span><a href="GHC.List.html#null"><span class="hs-identifier hs-var">null</span></a></span><span> </span><span class="annot"><span class="annottext">[String]
</span><a href="#local-6989586621679562425"><span class="hs-identifier hs-var">stack</span></a></span><span>
</span><span id="line-66"></span><span>      </span><span class="hs-keyword">then</span><span> </span><span class="annot"><span class="annottext">ErrorCall -&gt; IO a
forall e a. Exception e =&gt; e -&gt; IO a
</span><a href="GHC.IO.html#throwIO"><span class="hs-identifier hs-var">throwIO</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">String -&gt; ErrorCall
</span><a href="GHC.Exception.html#ErrorCall"><span class="hs-identifier hs-var">ErrorCall</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679562427"><span class="hs-identifier hs-var">x</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-67"></span><span>      </span><span class="hs-keyword">else</span><span> </span><span class="annot"><span class="annottext">ErrorCall -&gt; IO a
forall e a. Exception e =&gt; e -&gt; IO a
</span><a href="GHC.IO.html#throwIO"><span class="hs-identifier hs-var">throwIO</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">String -&gt; String -&gt; ErrorCall
</span><a href="GHC.Exception.html#ErrorCallWithLocation"><span class="hs-identifier hs-var">ErrorCallWithLocation</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679562427"><span class="hs-identifier hs-var">x</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">[String] -&gt; String
</span><a href="GHC.Stack.CCS.html#renderStack"><span class="hs-identifier hs-var">renderStack</span></a></span><span> </span><span class="annot"><span class="annottext">[String]
</span><a href="#local-6989586621679562425"><span class="hs-identifier hs-var">stack</span></a></span><span class="hs-special">)</span><span class="hs-special">)</span><span>
</span><span id="line-68"></span><span>
</span><span id="line-69"></span><span>
</span><span id="line-70"></span><span class="hs-comment">-- | Pop the most recent call-site off the 'CallStack'.</span><span>
</span><span id="line-71"></span><span class="hs-comment">--</span><span>
</span><span id="line-72"></span><span class="hs-comment">-- This function, like 'pushCallStack', has no effect on a frozen 'CallStack'.</span><span>
</span><span id="line-73"></span><span class="hs-comment">--</span><span>
</span><span id="line-74"></span><span class="hs-comment">-- @since 4.9.0.0</span><span>
</span><span id="line-75"></span><span class="annot"><a href="GHC.Stack.html#popCallStack"><span class="hs-identifier hs-type">popCallStack</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Stack.Types.html#CallStack"><span class="hs-identifier hs-type">CallStack</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Stack.Types.html#CallStack"><span class="hs-identifier hs-type">CallStack</span></a></span><span>
</span><span id="line-76"></span><span id="popCallStack"><span class="annot"><span class="annottext">popCallStack :: CallStack -&gt; CallStack
</span><a href="GHC.Stack.html#popCallStack"><span class="hs-identifier hs-var hs-var">popCallStack</span></a></span></span><span> </span><span id="local-6989586621679562419"><span class="annot"><span class="annottext">CallStack
</span><a href="#local-6989586621679562419"><span class="hs-identifier hs-var">stk</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">CallStack
</span><a href="#local-6989586621679562419"><span class="hs-identifier hs-var">stk</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-77"></span><span>  </span><span class="annot"><span class="annottext">CallStack
</span><a href="GHC.Stack.Types.html#EmptyCallStack"><span class="hs-identifier hs-var">EmptyCallStack</span></a></span><span>         </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">String -&gt; CallStack
forall a. String -&gt; a
</span><a href="GHC.Err.html#errorWithoutStackTrace"><span class="hs-identifier hs-var">errorWithoutStackTrace</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;popCallStack: empty stack&quot;</span></span><span>
</span><span id="line-78"></span><span>  </span><span class="annot"><a href="GHC.Stack.Types.html#PushCallStack"><span class="hs-identifier hs-type">PushCallStack</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-identifier">_</span></span><span> </span><span class="annot"><span class="annottext">SrcLoc
</span><span class="hs-identifier">_</span></span><span> </span><span id="local-6989586621679562415"><span class="annot"><span class="annottext">CallStack
</span><a href="#local-6989586621679562415"><span class="hs-identifier hs-var">stk'</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">CallStack
</span><a href="#local-6989586621679562415"><span class="hs-identifier hs-var">stk'</span></a></span><span>
</span><span id="line-79"></span><span>  </span><span class="annot"><a href="GHC.Stack.Types.html#FreezeCallStack"><span class="hs-identifier hs-type">FreezeCallStack</span></a></span><span> </span><span class="annot"><span class="annottext">CallStack
</span><span class="hs-identifier">_</span></span><span>      </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">CallStack
</span><a href="#local-6989586621679562419"><span class="hs-identifier hs-var">stk</span></a></span><span>
</span><span id="line-80"></span><span class="hs-pragma">{-# INLINE</span><span> </span><span class="annot"><a href="GHC.Stack.html#popCallStack"><span class="hs-pragma hs-type">popCallStack</span></a></span><span> </span><span class="hs-pragma">#-}</span><span>
</span><span id="line-81"></span><span>
</span><span id="line-82"></span><span class="hs-comment">-- | Return the current 'CallStack'.</span><span>
</span><span id="line-83"></span><span class="hs-comment">--</span><span>
</span><span id="line-84"></span><span class="hs-comment">-- Does *not* include the call-site of 'callStack'.</span><span>
</span><span id="line-85"></span><span class="hs-comment">--</span><span>
</span><span id="line-86"></span><span class="hs-comment">-- @since 4.9.0.0</span><span>
</span><span id="line-87"></span><span class="annot"><a href="GHC.Stack.html#callStack"><span class="hs-identifier hs-type">callStack</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Stack.Types.html#HasCallStack"><span class="hs-identifier hs-type">HasCallStack</span></a></span><span> </span><span class="hs-glyph">=&gt;</span><span> </span><span class="annot"><a href="GHC.Stack.Types.html#CallStack"><span class="hs-identifier hs-type">CallStack</span></a></span><span>
</span><span id="line-88"></span><span id="callStack"><span class="annot"><span class="annottext">callStack :: HasCallStack =&gt; CallStack
</span><a href="GHC.Stack.html#callStack"><span class="hs-identifier hs-var hs-var">callStack</span></a></span></span><span> </span><span class="hs-glyph">=</span><span>
</span><span id="line-89"></span><span>  </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">HasCallStack
CallStack
</span><a href="#local-6989586621679562412"><span class="hs-var">?callStack</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-90"></span><span>    </span><span class="annot"><span class="annottext">CallStack
</span><a href="GHC.Stack.Types.html#EmptyCallStack"><span class="hs-identifier hs-var">EmptyCallStack</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">CallStack
</span><a href="GHC.Stack.Types.html#EmptyCallStack"><span class="hs-identifier hs-var">EmptyCallStack</span></a></span><span>
</span><span id="line-91"></span><span>    </span><span class="annot"><span class="annottext">CallStack
</span><span class="hs-identifier">_</span></span><span>              </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">CallStack -&gt; CallStack
</span><a href="GHC.Stack.html#popCallStack"><span class="hs-identifier hs-var">popCallStack</span></a></span><span> </span><span class="annot"><span class="annottext">HasCallStack
CallStack
</span><a href="#local-6989586621679562411"><span class="hs-var">?callStack</span></a></span><span>
</span><span id="line-92"></span><span class="hs-pragma">{-# INLINE</span><span> </span><span class="annot"><a href="GHC.Stack.html#callStack"><span class="hs-pragma hs-type">callStack</span></a></span><span> </span><span class="hs-pragma">#-}</span><span>
</span><span id="line-93"></span><span>
</span><span id="line-94"></span><span class="hs-comment">-- | Perform some computation without adding new entries to the 'CallStack'.</span><span>
</span><span id="line-95"></span><span class="hs-comment">--</span><span>
</span><span id="line-96"></span><span class="hs-comment">-- @since 4.9.0.0</span><span>
</span><span id="line-97"></span><span id="local-6989586621679562457"><span class="annot"><a href="GHC.Stack.html#withFrozenCallStack"><span class="hs-identifier hs-type">withFrozenCallStack</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Stack.Types.html#HasCallStack"><span class="hs-identifier hs-type">HasCallStack</span></a></span><span>
</span><span id="line-98"></span><span>                    </span><span class="hs-glyph">=&gt;</span><span> </span><span class="hs-special">(</span><span> </span><span class="annot"><a href="GHC.Stack.Types.html#HasCallStack"><span class="hs-identifier hs-type">HasCallStack</span></a></span><span> </span><span class="hs-glyph">=&gt;</span><span> </span><span class="annot"><a href="#local-6989586621679562457"><span class="hs-identifier hs-type">a</span></a></span><span> </span><span class="hs-special">)</span><span>
</span><span id="line-99"></span><span>                    </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="#local-6989586621679562457"><span class="hs-identifier hs-type">a</span></a></span></span><span>
</span><span id="line-100"></span><span id="withFrozenCallStack"><span class="annot"><span class="annottext">withFrozenCallStack :: forall a. HasCallStack =&gt; (HasCallStack =&gt; a) -&gt; a
</span><a href="GHC.Stack.html#withFrozenCallStack"><span class="hs-identifier hs-var hs-var">withFrozenCallStack</span></a></span></span><span> </span><span id="local-6989586621679562407"><span class="annot"><span class="annottext">HasCallStack =&gt; a
</span><a href="#local-6989586621679562407"><span class="hs-identifier hs-var">do_this</span></a></span></span><span> </span><span class="hs-glyph">=</span><span>
</span><span id="line-101"></span><span>  </span><span class="hs-comment">-- we pop the stack before freezing it to remove</span><span>
</span><span id="line-102"></span><span>  </span><span class="hs-comment">-- withFrozenCallStack's call-site</span><span>
</span><span id="line-103"></span><span>  </span><span class="hs-keyword">let</span><span> </span><span class="">?callStack</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">CallStack -&gt; CallStack
</span><a href="GHC.Stack.Types.html#freezeCallStack"><span class="hs-identifier hs-var">freezeCallStack</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">CallStack -&gt; CallStack
</span><a href="GHC.Stack.html#popCallStack"><span class="hs-identifier hs-var">popCallStack</span></a></span><span> </span><span class="annot"><span class="annottext">CallStack
HasCallStack =&gt; CallStack
</span><a href="GHC.Stack.html#callStack"><span class="hs-identifier hs-var">callStack</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-104"></span><span>  </span><span class="hs-keyword">in</span><span> </span><span class="annot"><span class="annottext">a
HasCallStack =&gt; a
</span><a href="#local-6989586621679562407"><span class="hs-identifier hs-var">do_this</span></a></span><span>
</span><span id="line-105"></span></pre></body></html>